<style lang="scss" scoped>
.box {
  width: 100vw;
  height: 100vh;
  padding: 10px;
}
.content {
  width: 100%;
  height: 70px;
  padding: 10px;
  margin-top: 20px;
  background: #f1f1f1;
  font-size: 18px;
  display: flex;
  .left {
    margin-right: 15px;
    margin-top: 15px;
  }
  .right {
    align-items: center;
  }
}
footer {
  padding: 10px;
  width: 100%;
  height: 50px;
  position: absolute;
  bottom: 0;
  display: flex;
  justify-content: space-around;
}
</style>

<template>
  <div class="box">
    <header>
      <van-nav-bar
        left-arrow
        @click-left="$router.back()"
        title="网上预约挂号_在线资讯"
      />
    </header>
    
    <div v-for="(item, index) in userdata" :key="index" class="content">
      <div class="left">
        <van-checkbox v-model="checked" ></van-checkbox>
      </div>
      <div class="right">
        <div>
           <!-- @vue-ignore -->
          {{ item.username }}

          <span style="color: aqua">已实名</span>
        </div>
        
        <div>居民身份证
           <!-- @vue-ignore -->
          {{ item.userstanding }}</div>
      </div>
    </div>

    <footer>
      <van-button type="success" block round style="width: 99%" plain
      @click="$router.push('/Visit')"
        >新增就诊人</van-button
      >
      <van-button type="success" block round style="width: 99%"
      @click="handMake()"
        >确认</van-button
      >
    </footer>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { useRoute } from 'vue-router'
import axios from 'axios'
const checked = ref(true)




const userdata = ref<any[]>([])

const config = ref({
  name: '',
  standing: '',
  birthday: '',
  sex: '',
  phone: '',
  relation: '',
  age: 0,
})

const getData = async () => {




  const res = await axios.get('/api/user/list', config.value as any)


  const { data } = res.data
  console.log(data)
  userdata.value = data
}
getData()
const handMake=()=>{

}
</script>
